package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
public class Wxshoukuan {
    private int skId;
    private Integer gdId;//维修工单id
    private BigDecimal skMoney;//收款金额
    private Timestamp skTime;//收款日期
    private String skPeople;//操作人

    @Column(name = "sk_people")
    public String getSkPeople() {
        return skPeople;
    }

    public void setSkPeople(String skPeople) {
        this.skPeople = skPeople;
    }

    @Id
    @Column(name = "sk_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getSkId() {
        return skId;
    }

    public void setSkId(int skId) {
        this.skId = skId;
    }

    @Basic
    @Column(name = "gd_id", nullable = true)
    public Integer getGdId() {
        return gdId;
    }

    public void setGdId(Integer gdId) {
        this.gdId = gdId;
    }

    @Basic
    @Column(name = "sk_money", nullable = true, precision = 2)
    public BigDecimal getSkMoney() {
        return skMoney;
    }

    public void setSkMoney(BigDecimal skMoney) {
        this.skMoney = skMoney;
    }

    @Basic
    @Column(name = "sk_time", nullable = true)
    public Timestamp getSkTime() {
        return skTime;
    }

    public void setSkTime(Timestamp skTime) {
        this.skTime = skTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Wxshoukuan that = (Wxshoukuan) o;
        return skId == that.skId &&
                Objects.equals(gdId, that.gdId) &&
                Objects.equals(skMoney, that.skMoney) &&
                Objects.equals(skTime, that.skTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(skId, gdId, skMoney, skTime);
    }
}
